feat(models): add shared Content interface#2695
Conversation
baywet
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
A couple of minor suggestions
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
|
@baywet I'm sure that you already know but the tests are failing on Windows due to differences in newline formats, specifically between CRLF and LF |
baywet
left a comment
There was a problem hiding this comment.
Thank you for making the changes!
|
@mdaneri do you mean the unit tests? or a formatting issue with the source code? |
xunit tests 5 of 6 of them are failing on windows |
|
for example, |
|
I think it's an issue with my environment I force windows to use \n only not \r\n |
src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Vincent Biret <vincentbiret@hotmail.com>
|
@mdaneri the public API export needs to be refreshed, would you mind pushing that latest change please? |
Head branch was pushed to by a user without write access
feat(models): add shared Content interface * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/OpenApiHeader.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Update src/Microsoft.OpenApi/Models/OpenApiResponse.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * Remove inheritance from IOpenApiReadOnlyContentElement revert commit 7758a81 * Update src/Microsoft.OpenApi/Models/Interfaces/IOpenApiContentElement.cs Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> * test(publicapi): approve content interface surface --------- Co-authored-by: Vincent Biret <vincentbiret@hotmail.com> Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Pull Request
Description
Introduce a shared abstraction for OpenAPI elements that expose a
Contentmap, enabling generic helpers and reducing duplication across the model surface.Type of Change
Related Issue(s)
Fixes #2677
Changes Made
IOpenApiContentElement/IOpenApiReadOnlyContentElementto represent the sharedContentcapabilityIOpenApiResponse,IOpenApiRequestBody,IOpenApiParameter, andIOpenApiHeaderto inherit the shared interfaceTesting
Checklist
Versions applicability
Additional Notes
None